# -*- coding: utf-8 -*-

import requests
from settings import settings

access_token_url='https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={0}&secret={1}'
access_token_url=access_token_url.format(settings.APPID,settings.SECRET)

def refreshAccessToken():
	try:	
		response=requests.get(access_token_url,timeout=settings.HTTP_TIMEOUT)
		content=response.json()
		#print(content)
		return content
	except Exception as e:
		print('Error e:',e)

#refreshAccessToken()